var zhangsan = {
    name: '张三',
    birth: 2000,
    height: 170,
    weight: 50,
    school: 'DuGeGouBa school',
    score: 100
}

console.log(zhangsan.school)

var sanbing = {
    name: '伞兵',
    'school': 'big school'
}


console.log(sanbing['school']);

console.log('name' in sanbing);

console.log(sanbing.hasOwnProperty('name'));



var age = 20;
if (age >= 18) { 
    console.log('adult');
} else { 
    console.log('teenager');
}

var age = 3;
if (age >= 18) {
      console.log('adult');
} else if (age >= 6) {
      console.log('teenager');
} else {
      console.log('kid');
} 


var height= 1.75;
var weight= 80.5;
var heightsquare = height*height;
var BMI=weight/heightsquare

if (BMI < 18.5) {
      console.log('和我一样瘦');
} else if (BMI >18.5 && BMI<25) {
      console.log('正常');
} else if(BMI >25 && BMI<28){
      console.log('过重');
}else if(BMI >28 && BMI<32){
      console.log('肥胖');
}else if(BMI >32){
      console.log('严重肥胖');
}



var a = 0;
var i;
for(i=1; i<=10000;i++){
    a=a+i
}
console.log(a);


var c = {
    name: 'Maki',
    'school': 'bigzhuan school'
    }
    for (var key in c){
         if(c.hasOwnProperty(key)){
              console.log(key);
              console.log(c[key]);
         }
    }

var x = 0;
var n = 99;
while (n > 0) {
     x = x + n;
     n = n - 2;
}
console.log(x);    

var n = 0;
do {
    n = n + 5;
} while (n < 10);
console.log(n);



var arr = ['Bart', 'Lisa', 'Adam'];
var i,d
for(i=0;i<arr.length;i++){
    d = arr[i];
    console.log('Hello,'+d);
}








